package com.zhang.crm.controller;

import com.zhang.crm.pojo.TProduct;
import com.zhang.crm.result.R;
import com.zhang.crm.service.ProductService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProductController {

    @Resource
    private ProductService productService;

    @GetMapping("api/loadProductSelect")
    public R loadProductSelect() {
        List<TProduct> productList = productService.loadProductList();
        return R.OK(productList );
    }
}
